package com.lhy.mymall.request;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author: 卢辉宇
 * @date: 2022/12/16 20:54
 * @description:
 */
@Data
public class AddProductReq {

    @NotNull(message = "name不能为空")
    private String name;

    @NotNull(message = "image不能为空")
    private String image;

    private String detail;

    @NotNull(message = "分类不能为空")
    private Integer categoryId;

    @NotNull(message = "价格不能为空")
    @Min(value = 1,message = "价格不能小于1")
    private Integer price;

    @NotNull(message = "库存不能为空")
    @Max(value = 10000,message = "库存不能大于10000")
    private Integer stock;

    private Integer status;

}
